﻿using BD.Standard.YCWH.ProgramUploadERP.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BD.Standard.YCWH.ProgramUploadERP
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string type = "order";
            if (args.Any())
            {
                type = args[0];
            }
            /*else
            {
                type = Console.ReadLine();
               

            }*/


            Kingdee.BOS.WebApi.Client.K3CloudApiClient k3CloudApiClient = WebApi.WebApiClent("http://legiony9000p/k3cloud/", "66b0854ad55dd8", "张", "zzb@123..");
            if(k3CloudApiClient==null)
            {
                //登录失败；
            }

            switch (type.ToLower())
            {
                //获取基础资料
                case "base":

                    var material = new Material();
                    material.PostMaterial("exec YCWH_erp_Material");


                    var supplier = new Supplier();
                    supplier.PostSupplier("exec YCWH_erp_Supplier");

                    break;




                //获取订单数据
                case "order":

                    PurchaseOrder purchaseOrder = new PurchaseOrder();
                    purchaseOrder.PostPurchaseOrder("exec YCWH_erp_PurchaseOrder");




                    break;


            }

        }
    }

}
